package com.yxw.live_vod_boot.dto;



import com.yxw.live_vod_boot.entity.YxLiveActivityProductsEntity;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;



/*** 
*@author Jiaxu.Huang
*@date 2023/12/12 15:52:17
*@update 2023/12/12 15:52:17
**/
@Data
public class YxLiveActivityProductsDTO implements Serializable
{
    private static final long serialVersionUID = 41702367537888L;
    /**
    *直播间产品Id
    */
    @NotNull(message = "直播间产品Id不可为空")
    @ApiModelProperty(value = "直播间产品Id")
    private Long Id;
    /**
    *渠道Code
    */
    @NotNull(message = "渠道Code不可为空")
    @ApiModelProperty(value = "渠道Code")
    private String channelCode;
    /**
    *店铺内部Id
    */
    @NotNull(message = "店铺内部Id不可为空")
    @ApiModelProperty(value = "店铺内部Id")
    private Long liveShopId;
    /**
    *店铺外部Id
    */
    @NotBlank(message = "店铺外部Id不可为空")
    @ApiModelProperty(value = "店铺外部Id")
    private String shopId;
    /**
    *直播申请Id
    */
    @NotBlank(message = "直播申请Id不可为空")
    @ApiModelProperty(value = "直播申请Id")
    private String liveApplyId;
    /**
    *产品Id
    */
    @NotBlank(message = "产品Id不可为空")
    @ApiModelProperty(value = "产品Id")
    private String productId;
    /**
    *产品类别:0普通商品,1堂食商品
    */
    @NotNull(message = "产品类别:0普通商品,1堂食商品不可为空")
    @ApiModelProperty(value = "产品类别:0普通商品,1堂食商品")
    private Integer productType;
    /**
    *产品名称
    */
    @NotBlank(message = "产品名称不可为空")
    @ApiModelProperty(value = "产品名称")
    private String productName;
    /**
    *序号
    */
    @ApiModelProperty(value = "序号")
    private Integer productOrder;
    /**
    *产品主图片列表
    */
    @NotBlank(message = "产品主图片列表不可为空")
    @ApiModelProperty(value = "产品主图片列表")
    private String productMainPicture;
    /**
    *产品详情图片列表
    */
    @NotBlank(message = "产品详情图片列表不可为空")
    @ApiModelProperty(value = "产品详情图片列表")
    private String productDetailPicture;
    /**
    *产品关联的sku
    */
    @NotBlank(message = "产品关联的sku不可为空")
    @ApiModelProperty(value = "产品关联的sku")
    private String productLinkSku;
    /**
    *原价
    */
    @NotNull(message = "原价不可为空")
    @ApiModelProperty(value = "原价")
    private java.math.BigDecimal productPrice;
    /**
    *价格
    */
    @ApiModelProperty(value = "价格")
    private java.math.BigDecimal productLivePrice;
    /**
    *产品数量
    */
    @NotNull(message = "产品数量不可为空")
    @ApiModelProperty(value = "产品数量")
    private java.math.BigDecimal productNumber;
    /**
    *产品剩余数量
    */
    @ApiModelProperty(value = "产品剩余数量")
    private java.math.BigDecimal productRemainderNumber;
    /**
    *弹窗展示时长(秒),最大值120
    */
    @ApiModelProperty(value = "弹窗展示时长(秒),最大值120")
    private Integer popupShowDuration;
    /**
    *产品详情富文本
    */
    @ApiModelProperty(value = "产品详情富文本")
    private String productDetail;
    /**
    *产品类目Id(对应迎喜的行业分类Id)
    */
    @NotNull(message = "产品类目Id(对应迎喜的行业分类Id)不可为空")
    @ApiModelProperty(value = "产品类目Id(对应迎喜的行业分类Id)")
    private Long categoryId;
    /**
    *产品类目名称(对应迎喜的行业分类名称)
    */
    @NotBlank(message = "产品类目名称(对应迎喜的行业分类名称)不可为空")
    @ApiModelProperty(value = "产品类目名称(对应迎喜的行业分类名称)")
    private String categoryName;
    /**
    *规格值集合
    */
    @NotBlank(message = "规格值集合不可为空")
    @ApiModelProperty(value = "规格值集合")
    private String specificationValues;
    /**
    *创建时间
    */
    @ApiModelProperty(value = "创建时间")
    private java.util.Date createTime;
    /**
    *修改时间
    */
    @ApiModelProperty(value = "修改时间")
    private java.util.Date updateTime;
    /**
    *将DTO转换为ENTITY
    */
    public YxLiveActivityProductsEntity ConverToEntity()
    {
        YxLiveActivityProductsEntity oYxLiveActivityProductsEntity = new YxLiveActivityProductsEntity ();
        oYxLiveActivityProductsEntity.setId(Id) ;
        oYxLiveActivityProductsEntity.setChannelCode(channelCode) ;
        oYxLiveActivityProductsEntity.setLiveShopId(liveShopId) ;
        oYxLiveActivityProductsEntity.setShopId(shopId) ;
        oYxLiveActivityProductsEntity.setLiveApplyId(liveApplyId) ;
        oYxLiveActivityProductsEntity.setProductId(productId) ;
        oYxLiveActivityProductsEntity.setProductType(productType) ;
        oYxLiveActivityProductsEntity.setProductName(productName) ;
        oYxLiveActivityProductsEntity.setProductOrder(productOrder) ;
        oYxLiveActivityProductsEntity.setProductMainPicture(productMainPicture) ;
        oYxLiveActivityProductsEntity.setProductDetailPicture(productDetailPicture) ;
        oYxLiveActivityProductsEntity.setProductLinkSku(productLinkSku) ;
        oYxLiveActivityProductsEntity.setProductPrice(productPrice) ;
        oYxLiveActivityProductsEntity.setProductLivePrice(productLivePrice) ;
        oYxLiveActivityProductsEntity.setProductNumber(productNumber) ;
        oYxLiveActivityProductsEntity.setProductRemainderNumber(productRemainderNumber) ;
        oYxLiveActivityProductsEntity.setPopupShowDuration(popupShowDuration) ;
        oYxLiveActivityProductsEntity.setProductDetail(productDetail) ;
        oYxLiveActivityProductsEntity.setCategoryId(categoryId) ;
        oYxLiveActivityProductsEntity.setCategoryName(categoryName) ;
        oYxLiveActivityProductsEntity.setSpecificationValues(specificationValues) ;
        oYxLiveActivityProductsEntity.setCreateTime(createTime) ;
        oYxLiveActivityProductsEntity.setUpdateTime(updateTime) ;
        return oYxLiveActivityProductsEntity;
    }
}

